<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label label-required">VIP用户姓名</label>
            <div class="layui-input-block">
                <input name="name" value='{$vo.name|default=""}' required placeholder="请输入VIP用户姓名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label label-required">所选套餐</label>
             <div class="layui-input-block">
                <input name="commodity_title" value='{$vo.commodity_title|default=""}' required placeholder="请输入VIP用户姓名" class="layui-input">
            </div>
        </div>
		 <div class="layui-form-item">
		    <label class="layui-form-label label-required">开通套餐时间</label>
		    <div class="layui-input-inline margin-right-0" style="width:164px">
		       <input type="text" data-date-input="datetime" name="payTime" value='{$vo.payTime|default=""}' placeholder="请输入入职日期" class="layui-input">
		   </div>
		</div>
		<div class="layui-form-item">
		    <label class="layui-form-label label-required">套餐到期时间</label>
		  <div class="layui-input-inline margin-right-0" style="width:164px">
		     <input type="text" data-date-input="datetime" name="expritime" value='{$vo.expritime|default=""}' placeholder="请输入入职日期" class="layui-input">
		 </div>
		</div>
		<!-- <div class="layui-form-item">
		    <label class="layui-form-label label-required">接见员工</label>
		    <div class="layui-input-block">
		        <input name="app_user_name" value='{$vo.app_user_name|default=""}' required placeholder="请输入所属部门" class="layui-input">
		    </div>
		</div>
   
        <div class="layui-form-item nowrap">
            <label class="layui-form-label">预约日期</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="text" data-date-input="date" name="entry_date" value='{$vo.entry_date|default=""}' placeholder="请输入入职日期" class="layui-input">
            </div>
            <label class="layui-form-label" style="width:auto">到访日期</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="text" data-date-input="date" name="become_date" value='{$vo.become_date|default=""}' placeholder="请输入转正日期" class="layui-input">
            </div>
            <label class="layui-form-label" style="width:auto">培训日期</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="text" data-date-input="date" name="leave_date" value='{$vo.leave_date|default=""}' placeholder="请输入离职日期" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系ＱＱ</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="tel" autocomplete="off" name="contact_qq" value='{$vo.contact_qq|default=""}' pattern="^\d{6,}$" placeholder="请输入联系ＱＱ号码" class="layui-input">
            </div>
            <label class="layui-form-label" style="width:auto">联系手机</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入联系手机" class="layui-input">
            </div>
            <label class="layui-form-label" style="width:auto">联系邮箱</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系邮箱" class="layui-input">
            </div>
        </div> -->
    <!--    <div class="layui-form-item">
            <label class="layui-form-label">打卡绑定</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入绑定手机" class="layui-textarea" name="mobile_macs">{$vo.mobile_macs|default=""}</textarea>
            </div>
        </div>
    </div> -->

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>

</form>

<script>
    var login={
	check:function(){
		//获取登录页面中的用户名 和 密码
		var name=$('input[name="name"]').val(),
			commodityId=$('input[name="commodityId"]').val();
// 		if(!username){
// 			dialog.error('用户名不能为空');
// 		}
// 		if(!password){
// 			dialog.error('密码不能为空');
// 		}
		
		var url="viplist/edit",
			data={
				"name":name,
				"commodityId":commodityId
			};
		var load = dialog.load();
		$.post(url,data,function(result){
			layer.close(load);
			// alert("");
			if(result.code==400){
				return dialog.error(result.message);
			}
			if(result.code==200){
				return dialog.success(result.message,'{:url("viplist/index")}');
			}
			// return dialog.success(result.message,"{:url('admin/index')}");
		},'JSON');
	}
}
</script>
